<template>
    <div>
        用户名：<input type="text" v-model="username"><br>
        密码： <input type="password" v-model="password"><br>
        <button @click="sub">注册</button>

    </div>   
</template>

<script>

export default {
    data(){
        return {
            username:"",
            password:"",
        }
    },
    methods:{
        sub(){
            this.axios({
                url:"http://127.0.0.1:8000/reg",
                params:{
                    username:this.username,
                    password:this.password
                }
            })
            .then(res=>{
                this.$Message(res.data.message)
            })
        }
    }
}
</script>

<style>

</style>
